<HTML><HEAD><TITLE>licence_checkout(+Feature, ++Policy, +Version, +Path, -Message, -Status)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">library(flexlm)</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>licence_checkout(+Feature, ++Policy, +Version, +Path, -Message, -Status)</H1>
Check out a licenced feature from FlexLM
<DL>
<DT><EM>Feature</EM></DT>
<DD>String or atom
</DD>
<DT><EM>Policy</EM></DT>
<DD>List of atoms
</DD>
<DT><EM>Version</EM></DT>
<DD>String
</DD>
<DT><EM>Path</EM></DT>
<DD>String, possibly empty
</DD>
<DT><EM>Message</EM></DT>
<DD>Returns error/warning message, if any
</DD>
<DT><EM>Status</EM></DT>
<DD>Returns one of the atoms ok, warning, error
</DD>
</DL>
<H2>Description</H2>

	This maps directly to lp_checkout() of the FlexLM simple API.
<DL>
	<DT>Feature<DD>
	is the name of the feature to be checked out, passed directly
	to FlexLM.

	<DT>Policy<DD>
	is a list of atoms, containing one of
	<UL>
	<LI><EM>restrictive</EM> (the default), <EM>queue</EM>,
		<EM>failsafe</EM>, <EM>lenient</EM>
	</UL>
	and possibly one or more of
	<UL>
	<LI><EM>retry_restrictive</EM>
	<LI><EM>check_baddate</EM>
	<LI><EM>flexlock</EM>
	</UL>
	Note that LM_MANUAL_HEARTBEAT will always be set.  An empty
	list defaults to LM_RESTRICTIVE|LM_MANUAL_HEARTBEAT.

	<DT>Version<DD>
	is a version string, passed directly to FlexLM.

	<DT>Path<DD>
	is the name of the licence file.  If the empty string is
	given, it defaults to "licence.dat" in the ECLiPSe top-level
	installation directory.

	The lp_handle is not visible and stored internally by ECLiPSe. 
	The feature name is used to identify the checked out licence
	on the Eclipse level.

	<DT>Status<DD>
	will be bound to one of the atoms <EM>ok</EM>,<EM>warning</EM>,
	<EM>error</EM>

	<DT>Message<DD>
	will be bound to an error or warning message string in case
	the Status is not <EM>ok</EM>
</DL>
	Multiple checkouts of the same feature are allowed, but only if
	they are for the same Policy and Version. 
    
<H3>Fail Conditions</H3>
None
<H2>Examples</H2>
<PRE>
    ?- sepia_kernel:licence_checkout(swapper, [restrictive], "2.0", "", Msg, Status),
    	( Status = error -&gt;
	    writeln(error, Msg),
	    abort
	;
	    writeln(warning_output, Msg)
	;
	    true
	).
    </PRE>
<H2>See Also</H2>
<A HREF="../../kernel/env/get_flag-2.html">get_flag / 2</A>, <A HREF="../../lib/flexlm/licence_heartbeat-4.html">licence_heartbeat / 4</A>, <A HREF="../../lib/flexlm/licence_checkin-1.html">licence_checkin / 1</A>, <A HREF="../../lib/flexlm/licence_held-1.html">licence_held / 1</A>
</BODY></HTML>
